class Animals{
    public String name;
    public Animals(String name){
        this.name=name;
    }
    public void eat(){
        System.out.println(this.name+"吃饭");
    }
}
class Cat extends Animals{
    public Cat(){
        super("小猫咪");
    }
}
class Birds extends Animals{
    public String name="小鸟";
    public Birds(String name){
        super(name);
    }
    public void fly(){
        System.out.println(this.name+"飞起来了");
    }
}

public class TestDemo {
    public static void main(String[] args) {
        Birds birds=new Birds("小梅");
        birds.eat();
        birds.fly();
        Cat cat=new Cat();
        cat.eat();
    }
}
